<!DOCTYPE html>
<html lang="en">
<head>
  <!-- 禁止访问域名 -->
  <meta name="referrer" content="never">
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>小米-分页</title>
     <!--网页的图标-->
     <link rel="icon" href="../images/favicon.ico">
    <!-- 自己的样式 -->
    <link rel="stylesheet" href="../css/fenye.css">
    <!-- 公用样式 -->
    <link rel="stylesheet" href="../css/reset.css">
    <!-- 字体样式 -->
    <link rel="stylesheet" href="../css/iconfont.css">
    <!-- 分页样式 -->
    <link rel="stylesheet" href="../lib/layui/css/layui.css">
     <!-- 轮播图样式 -->
     <link rel="stylesheet" href="../lib/swiper/swiper-bundle.min.css">
</head>
<body>
    <div class="header">
        <div class="wrap">
            <ul class="header-left">
                <li><a href="#">小米商城</a><span>|</span></li>
                <li><a href="#">MIUI</a><span>|</span></li>
                <li><a href="#">loT</a><span>|</span></li>
                <li><a href="#">云服务</a><span>|</span></li>
                <li><a href="#">天星数科</a><span>|</span></li>
                <li><a href="#">有品</a><span>|</span></li>
                <li><a href="#">小爱开放平台</a><span>|</span></li>
                <li><a href="#">企业团购</a><span>|</span></li>
                <li><a href="#">资质证照</a><span>|</span></li>
                <li><a href="#">协议规则</a><span>|</span></li>
                <li>
                    <a href="#">下载app</a><span>|</span>
                    <div class="download">
                        <a href="#">
                            <img src="../images/78c30d4f259ed43ab20e810a522a6249.png" alt="">
                            <p>小米商城APP</p>
                        </a>
                    </div>
                    <div class="triangle"></div>
                </li>
                <li><a href="#">智能生活</a><span>|</span></li>
                <li><a href="#">Select Location</a></li>
            </ul>
            <ul class="header-right">
                <li><a href="./delu.html">登录</a><span>|</span></li>
                <li><a href="./zuce.html">注册</a><span>|</span></li>
                <li><a href="#">消息通知</a></li>
                <li class="cart">
                    <a href="#">
                        <i class="iconfont">&#xe653;</i>
                        购物车(0)
                    </a>
                    <div class="cart-list">
                        购物车中还没有商品，赶紧选购吧！
                    </div>
                </li>
            </ul>
        </div>
    </div>
<!--导航开始-->
<div class="nav">
    <div class="wrap">
        <div class="logo">
            <a href="#">
                <img src="../images/logo-mi2.png" alt="">
            </a>
        </div>
        <div class="nav-bar">
            <ul>
                <li>
                    <a href="#">小米手机</a>
                    <div class="nav-bar-list">
                        <div class="wrap">
                            <ul>
                                <li>
                                    <a href="#">
                                        <div class="img-box">
                                            <img src="../images/a1c45eadcedeb27b1cafca0359422da9.webp" alt="">
                                        </div>
                                        <p class="name1">小米11 Pro</p>
                                        <p class="price1">4499元起</p>
                                    </a>
                                </li>
                                <li>
                                    <a href="#">
                                        <div class="img-box">
                                            <img src="../images/a1c45eadcedeb27b1cafca0359422da9.webp" alt="">
                                        </div>
                                        <p class="name1">小米11 Pro</p>
                                        <p class="price1">4499元起</p>
                                    </a>
                                </li>
                                <li>
                                    <a href="#">
                                        <div class="img-box">
                                            <img src="../images/a1c45eadcedeb27b1cafca0359422da9.webp" alt="">
                                        </div>
                                        <p class="name1">小米11 Pro</p>
                                        <p class="price1">4499元起</p>
                                    </a>
                                </li>
                                <li>
                                    <a href="#">
                                        <div class="img-box">
                                            <img src="../images/a1c45eadcedeb27b1cafca0359422da9.webp" alt="">
                                        </div>
                                        <p class="name1">小米11 Pro</p>
                                        <p class="price1">4499元起</p>
                                    </a>
                                </li>
                                <li>
                                    <a href="#">
                                        <div class="img-box">
                                            <img src="../images/a1c45eadcedeb27b1cafca0359422da9.webp" alt="">
                                        </div>
                                        <p class="name1">小米11 Pro</p>
                                        <p class="price1">4499元起</p>
                                    </a>
                                </li>
                                <li>
                                    <a href="#">
                                        <div class="img-box">
                                            <img src="../images/a1c45eadcedeb27b1cafca0359422da9.webp" alt="">
                                        </div>
                                        <p class="name1">小米11 Pro</p>
                                        <p class="price1">4499元起</p>
                                    </a>
                                </li>
                            </ul>
                        </div>
                    </div>
                </li>
                <li>
                    <a href="#">Redmi红米</a>
                    <div class="nav-bar-list">
                        <div class="wrap">
                            <ul>
                                <li>
                                    <a href="#">
                                        <div class="img-box">
                                            <img src="../images/88bb84ff06f0ab467b859aeed36b817a.webp" alt="">
                                        </div>
                                        <p class="name1">小米11 Pro</p>
                                        <p class="price1">4499元起</p>
                                    </a>
                                </li>
                                <li>
                                    <a href="#">
                                        <div class="img-box">
                                            <img src="../images/a1c45eadcedeb27b1cafca0359422da9.webp" alt="">
                                        </div>
                                        <p class="name1">小米11 Pro</p>
                                        <p class="price1">4499元起</p>
                                    </a>
                                </li>
                                <li>
                                    <a href="#">
                                        <div class="img-box">
                                            <img src="../images/a1c45eadcedeb27b1cafca0359422da9.webp" alt="">
                                        </div>
                                        <p class="name1">小米11 Pro</p>
                                        <p class="price1">4499元起</p>
                                    </a>
                                </li>
                                <li>
                                    <a href="#">
                                        <div class="img-box">
                                            <img src="../images/a1c45eadcedeb27b1cafca0359422da9.webp" alt="">
                                        </div>
                                        <p class="name1">小米11 Pro</p>
                                        <p class="price1">4499元起</p>
                                    </a>
                                </li>
                                <li>
                                    <a href="#">
                                        <div class="img-box">
                                            <img src="../images/a1c45eadcedeb27b1cafca0359422da9.webp" alt="">
                                        </div>
                                        <p class="name1">小米11 Pro</p>
                                        <p class="price1">4499元起</p>
                                    </a>
                                </li>
                                <li>
                                    <a href="#">
                                        <div class="img-box">
                                            <img src="../images/a1c45eadcedeb27b1cafca0359422da9.webp" alt="">
                                        </div>
                                        <p class="name1">小米11 Pro</p>
                                        <p class="price1">4499元起</p>
                                    </a>
                                </li>
                            </ul>
                        </div>
                    </div>
                </li>
                <li>
                    <a href="#">电视</a>
                    <div class="nav-bar-list">
                        <div class="wrap">
                            <ul>
                                <li>
                                    <a href="#">
                                        <div class="img-box">
                                            <img src="../images/dianshi.webp" alt="">
                                        </div>
                                        <p class="name1">小米11 Pro</p>
                                        <p class="price1">4499元起</p>
                                    </a>
                                </li>
                                <li>
                                    <a href="#">
                                        <div class="img-box">
                                            <img src="../images/diannao.webp" alt="">
                                        </div>
                                        <p class="name1">小米11 Pro</p>
                                        <p class="price1">4499元起</p>
                                    </a>
                                </li>
                                <li>
                                    <a href="#">
                                        <div class="img-box">
                                            <img src="../images/dianshi.webp" alt="">
                                        </div>
                                        <p class="name1">小米11 Pro</p>
                                        <p class="price1">4499元起</p>
                                    </a>
                                </li>
                                <li>
                                    <a href="#">
                                        <div class="img-box">
                                            <img src="../images/dianshi.webp" alt="">
                                        </div>
                                        <p class="name1">小米11 Pro</p>
                                        <p class="price1">4499元起</p>
                                    </a>
                                </li>
                                <li>
                                    <a href="#">
                                        <div class="img-box">
                                            <img src="../images/dianshi.webp" alt="">
                                        </div>
                                        <p class="name1">小米11 Pro</p>
                                        <p class="price1">4499元起</p>
                                    </a>
                                </li>
                                <li>
                                    <a href="#">
                                        <div class="img-box">
                                            <img src="../images/dianshi.webp" alt="">
                                        </div>
                                        <p class="name1">小米11 Pro</p>
                                        <p class="price1">4499元起</p>
                                    </a>
                                </li>
                            </ul>
                        </div>
                    </div>
                </li>
                <li>
                    <a href="#">笔记本</a>
                    <div class="nav-bar-list">
                        <div class="wrap">
                            <ul>
                                <li>
                                    <a href="#">
                                        <div class="img-box">
                                            <img src="../images/diannao2.webp" alt="">
                                        </div>
                                        <p class="name1">RedmiBook Pro 14 锐龙版</p>
                                        <p class="price1">4499元起</p>
                                    </a>
                                </li>
                                <li>
                                    <a href="#">
                                        <div class="img-box">
                                            <img src="../images/diannao2.webp" alt="">
                                        </div>
                                        <p class="name1">RedmiBook Pro 14 锐龙版</p>
                                        <p class="price1">4499元起</p>
                                    </a>
                                </li>
                                <li>
                                    <a href="#">
                                        <div class="img-box">
                                            <img src="../images/diannao2.webp" alt="">
                                        </div>
                                        <p class="name1">RedmiBook Pro 14 锐龙版</p>
                                        <p class="price1">4499元起</p>
                                    </a>
                                </li>
                                <li>
                                    <a href="#">
                                        <div class="img-box">
                                            <img src="../images/diannao2.webp" alt="">
                                        </div>
                                        <p class="name1">RedmiBook Pro 14 锐龙版</p>
                                        <p class="price1">4499元起</p>
                                    </a>
                                </li>
                                <li>
                                    <a href="#">
                                        <div class="img-box">
                                            <img src="../images/diannao2.webp" alt="">
                                        </div>
                                        <p class="name1">RedmiBook Pro 14 锐龙版</p>
                                        <p class="price1">4499元起</p>
                                    </a>
                                </li>
                                <li>
                                    <a href="#">
                                        <div class="img-box">
                                            <img src="../images/diannao2.webp" alt="">
                                        </div>
                                        <p class="name1">RedmiBook Pro 14 锐龙版</p>
                                        <p class="price1">4499元起</p>
                                    </a>
                                </li>
                            </ul>
                        </div>
                    </div>
                </li>
                <li>
                    <a href="#">家电</a>
                    <div class="nav-bar-list">
                        <div class="wrap">
                            <ul>
                                <li>
                                    <a href="#">
                                        <div class="img-box">
                                            <img src="../images/binxiang.webp" alt="">
                                        </div>
                                        <p class="name1">米家风冷对开门冰箱 483L</p>
                                        <p class="price1">4499元起</p>
                                    </a>
                                </li>
                                <li>
                                    <a href="#">
                                        <div class="img-box">
                                            <img src="../images/binxiang.webp" alt="">
                                        </div>
                                        <p class="name1">米家风冷对开门冰箱 483L</p>
                                        <p class="price1">4499元起</p>
                                    </a>
                                </li>
                                <li>
                                    <a href="#">
                                        <div class="img-box">
                                            <img src="../images/binxiang.webp" alt="">
                                        </div>
                                        <p class="name1">米家风冷对开门冰箱 483L</p>
                                        <p class="price1">4499元起</p>
                                    </a>
                                </li>
                                <li>
                                    <a href="#">
                                        <div class="img-box">
                                            <img src="../images/binxiang.webp" alt="">
                                        </div>
                                        <p class="name1">米家风冷对开门冰箱 483L</p>
                                        <p class="price1">4499元起</p>
                                    </a>
                                </li>
                                <li>
                                    <a href="#">
                                        <div class="img-box">
                                            <img src="../images/binxiang.webp" alt="">
                                        </div>
                                        <p class="name1">米家风冷对开门冰箱 483L</p>
                                        <p class="price1">4499元起</p>
                                    </a>
                                </li>
                                <li>
                                    <a href="#">
                                        <div class="img-box">
                                            <img src="../images/binxiang.webp" alt="">
                                        </div>
                                        <p class="name1">米家风冷对开门冰箱 483L</p>
                                        <p class="price1">4499元起</p>
                                    </a>
                                </li>
                            </ul>
                        </div>
                    </div>
                </li>
                <li>
                    <a href="#">路由器</a>
                    <div class="nav-bar-list">
                        <div class="wrap">
                            <ul>
                                <li>
                                    <a href="#">
                                        <div class="img-box">
                                            <img src="../images/luyou.webp" alt="">
                                        </div>
                                        <p class="name1">小米路由器AX9000</p>
                                        <p class="price1">4499元起</p>
                                    </a>
                                </li>
                                <li>
                                    <a href="#">
                                        <div class="img-box">
                                            <img src="../images/luyou.webp" alt="">
                                        </div>
                                        <p class="name1">小米路由器AX9000</p>
                                        <p class="price1">4499元起</p>
                                    </a>
                                </li>
                                <li>
                                    <a href="#">
                                        <div class="img-box">
                                            <img src="../images/luyou.webp" alt="">
                                        </div>
                                        <p class="name1">小米路由器AX9000</p>
                                        <p class="price1">4499元起</p>
                                    </a>
                                </li>
                                <li>
                                    <a href="#">
                                        <div class="img-box">
                                            <img src="../images/luyou.webp" alt="">
                                        </div>
                                        <p class="name1">小米路由器AX9000</p>
                                        <p class="price1">4499元起</p>
                                    </a>
                                </li>
                                <li>
                                    <a href="#">
                                        <div class="img-box">
                                            <img src="../images/luyou.webp" alt="">
                                        </div>
                                        <p class="name1">小米路由器AX9000</p>
                                        <p class="price1">4499元起</p>
                                    </a>
                                </li>
                                <li>
                                    <a href="#">
                                        <div class="img-box">
                                            <img src="../images/luyou.webp" alt="">
                                        </div>
                                        <p class="name1">小米路由器AX9000</p>
                                        <p class="price1">4499元起</p>
                                    </a>
                                </li>
                            </ul>
                        </div>
                    </div>
                </li>
                <li><a href="#">智能硬件</a></li>
                <li><a href="#">服务</a></li>
                <li><a href="#">社区</a></li>
            </ul>
        </div>
        <div class="search">
            <input type="text">
            <a href="#" class="iconfont">&#xe63d;</a>
            <div class="search-list">
                <a href="#">全部商品</a>
                <a href="#">全部商品</a>
                <a href="#">全部商品</a>
                <a href="#">全部商品</a>
                <a href="#">全部商品</a>
                <a href="#">全部商品</a>
                <a href="#">全部商品</a>
                <a href="#">全部商品</a>
            </div>
        </div>
    </div>
</div>
<!--导航结束-->
<!--banner开始-->
<div class="banner">
    <div class="wrap">
        <div class="banner-box">
            <div class="swiper">
                <div class="swiper-wrapper">
                    <div class="swiper-slide"><img src="../images/df2369d997045119dd702157f8f08160.jpeg" style="width: 100%;height: 100%;"></div>
                    <div class="swiper-slide"><img src="../images/2a22ab561583a5da6c78e2f12862f23d.jpeg" style="width: 100%;height: 100%;"></div>
                    <div class="swiper-slide"><img src="../images/db5466e1003bac2e35b3061d279ab827.jpeg" style="width: 100%;height: 100%;"></div>
                </div>
                <!-- 如果需要分页器 -->
                <div class="swiper-pagination"></div>
                <!-- 如果需要导航按钮 -->
                <div class="swiper-button-prev"></div>
                <div class="swiper-button-next"></div>
            </div>
        </div>
    </div>
</div>
<!--banner结束-->    
<div class="container">
    <div class="wrap">
        <!--手机开始-->
            <div class="home-box" id="list">
                <h2 class="title">景点</h2>
                <div class="home-box-right">
                    <ul>
                        <li class="items">
                            <a href="#">
                                <img src="../images/61454401f855cf5ed64747a6ac04bae5.webp" alt="" class="img1">
                                <p class="name2">Note 10 Pro</p>
                                <p class="desc2">天玑1100年度旗舰芯，VC液冷散热</p>
                                <p class="price2">1599元起
                                    <del>1699元</del>
                                </p>
                            </a>
                        </li>
                    </ul>
                </div>   
               
            </div>
            <div id="page"></div>
        </div> 
        <!--手机结束-->     
    </div>
</div>

<!--页脚开始-->
<div class="footer">
    <div class="site-footer">
        <div class="wrap">
            <div class="footer-service">
                <ul>
                    <li>
                        <a href="#">
                            <i class="iconfont">&#xe606;</i>
                            <span>预约维修服务</span>
                        </a>
                    </li>
                    <li>
                        <a href="#">
                            <i class="iconfont">&#xe606;</i>
                            <span>15天免费换货</span>
                        </a>
                    </li>
                    <li>
                        <a href="#">
                            <i class="iconfont">&#xe606;</i>
                            <span>7天无理由退货</span>
                        </a>
                    </li>
                    <li>
                        <a href="#">
                            <i class="iconfont">&#xe606;</i>
                            <span>满69包邮</span>
                        </a>
                    </li>
                    <li>
                        <a href="#">
                            <i class="iconfont">&#xe606;</i>
                            <span>520余家售后网点</span>
                        </a>
                    </li>
                </ul>
            </div>
            <div class="footer-links">
                <ul>
                    <li>
                        帮助中心
                    </li>
                    <li>
                        <a href="#">账户管理</a>
                    </li>
                    <li>
                        <a href="#">购物指南</a>
                    </li>
                    <li>
                        <a href="#">订单操作</a>
                    </li>
                </ul>
                <ul>
                    <li>
                        服务支持
                    </li>
                    <li>
                        <a href="#">售后政策</a>
                    </li>
                    <li>
                        <a href="#">自助服务</a>
                    </li>
                    <li>
                        <a href="#">相关下载</a>
                    </li>
                </ul>
                <ul>
                    <li>
                        线下门店
                    </li>
                    <li>
                        <a href="#">小米之家</a>
                    </li>
                    <li>
                        <a href="#">服务网点</a>
                    </li>
                    <li>
                        <a href="#">授权体验店/专区</a>
                    </li>
                </ul>
                <ul>
                    <li>
                        关于小米
                    </li>
                    <li>
                        <a href="#">理解小米</a>
                    </li>
                    <li>
                        <a href="#">加入小米</a>
                    </li>
                    <li>
                        <a href="#">投资者关系</a>
                    </li>
                    <li>
                        <a href="#">企业社会责任</a>
                    </li>
                    <li>
                        <a href="#">廉洁举报</a>
                    </li>
                </ul>
                <ul>
                    <li>
                       关注我们
                    </li>
                    <li>
                        <a href="#">新浪微博</a>
                    </li>
                    <li>
                        <a href="#">官方微信</a>
                    </li>
                    <li>
                        <a href="#">联系我们</a>
                    </li>
                    <li>
                        <a href="#">公益基金会</a>
                    </li>
                    
                </ul>
                <ul>
                    <li>
                        特色服务
                    </li>
                    <li>
                        <a href="#">F码通道</a>
                    </li>
                    <li>
                        <a href="#">礼物码</a>
                    </li>
                    <li>
                        <a href="#">防伪查询</a>
                    </li>
                </ul>
                <div class="contact">
                    <p class="tel">400-100-5678</p>
                    <p class="time">8:00-18:00（仅收市话费）</p>
                    <a href="#" class="kefu">
                        <i class="iconfont">&#xe710;</i>
                        人工客服
                    </a>
                    <p class="follow">
                        关注小米：
                        <span class="wb"></span>
                        <span class="wx"></span>
                        <img src="../images/wx-img.png" alt="" class="wx-img">
                    </p>
                </div>
            </div>
        </div>
    </div>
    <div class="site-info">
        <div class="wrap">
            <div class="footer-logo">
                <img src="../images/logo-mi2.png" alt="">
            </div>
            <div class="sites">
                <p>
                    <a rel="nofollow" href="//www.mi.com/index.html" target="_blank">小米商城</a>
                    <span class="sep">|</span>
                    <a rel="nofollow" href="//www.miui.com/" target="_blank">MIUI</a>
                    <span class="sep">|</span>
                    <a rel="nofollow" href="//home.mi.com/index.html" target="_blank">米家</a>
                    <span class="sep">|</span>
                    <a rel="nofollow" href="http://www.miliao.com/" target="_blank">米聊</a>
                    <span class="sep">|</span>
                    <a rel="nofollow" href="//www.duokan.com/" target="_blank">多看</a>
                    <span class="sep">|</span>
                    <a rel="nofollow" href="//game.xiaomi.com/" target="_blank">游戏</a>
                    <span class="sep">|</span>
                    <a rel="nofollow" href="//b.mi.com/?client_id=180100031058&masid=17409.0358" target="_blank">政企服务</a>
                    <span class="sep">|</span>
                    <a rel="nofollow" href="//xiaomi.tmall.com/" target="_blank">小米天猫店</a>
                    <span class="sep">|</span>
                    <a rel="nofollow" href="//privacy.mi.com/all/zh_CN/" target="_blank">小米集团隐私政策</a>
                    <span class="sep">|</span>
                    <a rel="nofollow" href="//cdn.cnbj1.fds.api.mi-img.com/mi-mall/f516fe9e2c01.html" target="_blank">小米公司儿童信息保护规则</a>
                    <span class="sep">|</span>
                    <a rel="nofollow" href="//cdn.cnbj1.fds.api.mi-img.com/mi-mall/ded8d0e4a77d.html" target="_blank">小米商城隐私政策</a>
                    <span class="sep">|</span>
                    <a rel="nofollow" href="//www.mi.com/about/user-agreement/" target="_blank">小米商城用户协议</a>
                    <span class="sep">|</span>
                    <a rel="nofollow" href="//static.mi.com/feedback/" target="_blank">问题反馈</a>
                    <span class="sep">|</span>
                    <a rel="nofollow" href="javascript:void(0);" class="J_siteGlobalRegion">Select Location</a>
                    <br>
                    <a rel="nofollow" href="http://www.mi.com/beihu" target="_blank">北京互联网法院法律服务工作站</a>
                    <span class="sep">|</span>
                    <a rel="nofollow" href="http://www.cca.org.cn/" target="_blank">中国消费者协会</a>
                    <span class="sep">|</span>
                    <a rel="nofollow" href="http://www.bj315.org/" target="_blank">北京市消费者协会</a>
                </p>
                <p>
                    ©
                    <a href="javascript:;" target="_blank" title="mi.com">mi.com</a> 京ICP证110507号
                    <a href="http://beian.miit.gov.cn/" target="_blank" rel="nofollow">京ICP备10046444号</a>
                    <a rel="nofollow" href="http://www.beian.gov.cn/portal/registerSystemInfo?recordcode=11010802020134" target="_blank">京公网安备11010802020134号</a>
                    <a href="//www.mi.com/culture-license/" target="_blank">京网文[2020]0276-042号</a>
                    <br>
                    <a href="//www.mi.com/medical/record/" target="_blank">（京）网械平台备字（2018）第00005号</a>
                    <a href="//www.mi.com/medical/qualification/" target="_blank">互联网药品信息服务资格证 (京)-非经营性-2014-0090</a>
                    <a href="//www.mi.com/business-license/" target="_blank">营业执照</a>
                    <a href="//www.mi.com/medical/list/" target="_blank">医疗器械质量公告</a>
                    <br>
                    <a href="https://cdn.cnbj1.fds.api.mi-img.com/mi-mall/e0c7d4cf3b7cd88de10196e30c92e020.png" target="_blank">增值电信业务许可证</a>&nbsp;网络食品经营备案 京食药网食备202010048 &nbsp;
                    <a href="https://cdn.cnbj1.fds.api.mi-img.com/mi-mall/c6859168166651511897f54fa1047fe3.png" target="_blank">食品经营许可证</a>
                    <br>
                    违法和不良信息举报电话：171-5104-4404&nbsp;<a href='https://www.mi.com/intellectual' target="_blank">知识产权侵权投诉</a>&nbsp;本网站所列数据，除特殊说明，所有数据均出自我司实验室测试
                </p>
                <p>
                    <img src="../images/copy1.png" alt="">
                    <img src="../images/copy2.png" alt="">
                    <img src="../images/copy3.png" alt="">
                    <img src="../images/copy4.png" alt="">
                    <img src="../images/copy5.png" alt="">
                </p>
            </div>
            <img src="../images/slogan2020.png" alt="" class="slogan">
        </div>
    </div>
</div>
</body>
</html>
<!-- 轮播图 -->
<script src="../lib/swiper/swiper-bundle.min.js"></script>
<!-- 分页 -->
<script src="../lib/layui/layui.js"></script>
<!-- jq -->
<script src="../lib/jquery/jquery.min.js"></script>
<script src="../js/cookie.js"></script>
<script src="../js/chenkl.js"></script>
<!-- <script src="../js/fenye.js"></script> -->
<!-- 轮播图 -->
<script>
    // swiper轮播图的使用
    var mySwiper = new Swiper('.swiper', {
        loop: true, // 循环模式选项
        
        // 如果需要分页器
        pagination: {
            el: '.swiper-pagination',
        },
        
        // 如果需要前进后退按钮
        navigation: {
            nextEl: '.swiper-button-next',
            prevEl: '.swiper-button-prev',
        },
        // 切换效果
        effect: 'fade',
        // effect:'cube',
        // 自动轮播
        autoplay: {
            delay: 3000,
            pauseOnMouseEnter: true,
            disableOnInteraction: false
        }
    })
</script> 
<!-- 渲染页面 -->
<script >
    $.ajax({
    url:'../server/list.php',
    dataType:'json',
    success(res){
      // 结构数据
      let {data} = res;
      // layui分页组件
    //   引入了layui之后使用use方法导入laypage
    layui.use(['laypage'], function(){
      let laypage = layui.laypage;              
      //调用分页
      laypage.render({
        elem: 'page', // 在页面中渲染分页组件的标签id
        count: data.length, // 总数据的条数
        // count:数据总条数显示 prev:上一页  next:下一页
        layout: ['prev', 'page', 'next', 'limit', 'refresh', 'skip'],
        limits:[5,10,15],
        limit:10,
        first:'首页',
        last:'尾页',
        groups:6,
        jump: function(obj){ // 页码跳转函数        
          let str = function(){ // 自调用函数执行,返回一个拼接好的html字符串
            var thisData = data.concat().splice((obj.curr -1)*obj.limit, obj.limit);          
            var arr = thisData.map(v=>`
            <li class="items">
                            <a href=" javascript:;">
                                <img src="${v.imgpath.split('==========')[0]}" alt="" class="img1">
                                <p class="name2">${v.name}</p>
                                <p class="desc2">${v.introduce}</p>
                                <p class="price2">${v.price}
                                    <del>1699元</del>
                                </p>
                                <p class="top"><a href="." class="detail" index=${v.id}>查看详情</a></p>
                            </a>
                        </li>
            `);
            return arr.join('');
          }();
          //渲染
          $('.home-box-right>ul').html(str);
    
        }
      });     
    });
    }
  })
  
// 使用事件委托进行查看详情的跳转
$('#list').on('click','.detail',function () {
  // 获取商品的id
  let id = $(this).attr('index');
  // 将商品id存储到sessionStorage中  在跳转的页面中页面方法到商品的id
  sessionStorage.setItem('goodsId',id);
  // 跳转
  location.href = './detail.html';
  return false;// 阻止默认跳转
})
</script>